home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9243 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.salford.ac.uk!mcswkstn45
  2. From: MCF100@news.salford.ac.uk (Nick Ridgway)
  3. Newsgroups: comp.lang.c++
  4. Subject: Lack of exception handling in MSVC++ 1.52
  5. Date: Thu, 29 Feb 96 20:20:55 GMT
  6. Organization: University of Salford
  7. Message-ID: <4h51r7$7g0_001@salford.ac.uk>
  8. NNTP-Posting-Host: mcswkstn45.salford.ac.uk
  9. X-Newsreader: News Xpress Version 1.0 Beta #3
  10.  
  11. After about a year of enduring OWL 2.0 we decided to do ourselves a favour and 
  12. get Visual C++.  At first it was great, MFC is far easier to use and 
  13. everything was wonderful.  Then, during debugging we noticed that memory was 
  14. occasionally being leaked when an exception was thrown, and further 
  15. investigation revealed that destructors were not being called when the stack 
  16. was unwound.  At first we thought this was not quite right, but then the 
  17. compiler documentation told us this was so.
  18.  
  19. So, we see 2 options:
  20.  
  21. 1. TRY every single function call that may throw an exception and write    
  22.    destruct functions for all our classes, call them manually, then pass the  
  23.    exception along.
  24.  
  25. 2. Throw the damn compiler in the bin where it belongs and go back to Borland.
  26.  
  27. Presumably there will be quite afew others will the same problem, and bearing 
  28. in mind that (1) kind of misses the point of exception handling in the first 
  29. place and (2) means endless hours of porting and retesting, is there a 
  30. practical solution?
  31.  
  32. By the way, has anyone got a QuickWin project to link successfully in Debug 
  33. mode with MFC?
  34.  
  35. Many thanks, Nick.
  36.  
  37. Yet another Microsoft masterpiece.
  38.